package com.kolakcc.loljclient.controller;

import com.gvaneyck.rtmp.Callback;
import com.gvaneyck.rtmp.TypedObject;
import com.kolakcc.loljclient.StartupClass;

public class RecievePacketController extends KolaController implements Callback {
	public RecievePacketController() {
	}

	@Override
	public void callback(TypedObject result) {
		System.out.println("Recieved packet: ");
		System.out.println(result);
		if (result.getString("result").equals("receive")) {
			if (result.getTO("data").getTO("body").type
					.equals("com.riotgames.platform.game.GameDTO")) {
				StartupClass.customGameLobbyController.receivePacket(result
						.getTO("data").getTO("body"));
			}
		}
	}

}
